//
//  RecommendCell.m
//  糗事百科
//
//  Created by 奚超明 on 16/6/2.
//  Copyright © 2016年 奚超明. All rights reserved.
//

#import "RecommendCell.h"
#import "RecommendModel.h"
#import "CrossUserModel.h"

@interface RecommendCell ()
@property (weak, nonatomic) IBOutlet UIImageView *iconImageView;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *contentLabel;

@end

@implementation RecommendCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    self.iconImageView.layer.cornerRadius = self.iconImageView.xcm_width * 0.5;
    self.iconImageView.layer.masksToBounds = YES;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setModel:(RecommendModel *)model
{
    _model = model;
    [self.iconImageView sd_setImageWithURL:[NSURL URLWithString:model.user.icon]];
    self.nameLabel.text = model.user.login;
    self.contentLabel.text = model.content;
}

@end
